<style>
    .dTrans td{
        padding-right: 7px;
        padding-left: 7px;
        color:#696969;
        font-family:fantasy;
    }
    .dTrans tr:hover td{
        padding-right: 7px;
        padding-left: 7px;
        color:#4682B4;
        font-family:fantasy;
        cursor: pointer;
    }

    .dTrans thead{
        text-align:center;
        color: #4682B4;
        font-family:fantasy;
        font-size: 14;
    }
    .responseTrans{
        width:50px;
        height: 25px;
        text-align: center;
    }
     .dTrans a{
        color:#0066CC;
        text-decoration: none;
    }
    .dTrans a:hover{
        color: #4682B4;
        cursor: pointer;
        text-decoration: none;
    }
    .responseTrans a{
        color: #FFFFFF;
        text-decoration: none;
        font-family:fantasy;
    }
    .responseTrans a:hover{
        color: #FFFFFF;
        text-decoration: none;
        font-family:fantasy;
    }


</style>
<script type="text/javascript">
function display(theid){
    $.post("<?=$this->url(array('controller'=>'Transaction',
            'action'=>'display'))?>", {id:""+theid+""},
                                        function(data){                 
               
                $('#dTrans').html(data);
			});

}    
</script>

<div id="dTrans" class="dTrans">
    <?php
 foreach ($this->message as $message) :
         echo $this->escape($message);
 endforeach;
?>
<table>
    
    <thead>
    <th>
        <b>Kode Transaksi</b>
    </th>
    <th>
        <b> Toko</b>
    </th>
    <th>
        <b>Tanggal Transaksi</b>
    </th>
    <th>
        <b>Keterangan</b>
    </th>
    <th>
        <b>Status</b>
    </th>
</thead>
<tr>
    <td colspan="5">
        <hr  width="100%" />
    </td>
</tr>
<?php
foreach ($this->transaction as $trans):
?>

<tr onclick="display('<?=$trans['transaction_id']?>');">
    <td width="40"><?=$trans['code'];?></td>
        <td width="20"><?php $shop=$this->shop->getShop($trans['shop_id']);echo $shop['name'];?></td>
        <td width="10"><?=$this->additional->monthConverter($trans['date']); ?></td>
        <td width="40"><?=$trans['details']; ?></td>
        <td width="30"><?=$this->transStatus->getDescription('status_id='.$trans['transaction_status_id']);?></td>
        <td align="left" style="padding-left:0;"><?php
            if($trans['transaction_status_id'] == 1){?>
            <div class="responseTrans"><a href="<?=$this->url(array('controller'=>'transaction',
            'action'=>'confirm', 'id'=>$trans['transaction_id']))?>"><img src="<?=$this->baseUrl();?>/images/icons/responseTrans.png" title="Upload Bukti Pembayaran" width="20" height="20"/></a></div>
                <?php
            }
        ?></td>
    </tr>

<?php
endforeach;
?>
    <tr>
    <td colspan="5">
        <hr  width="100%" />
    </td>
    </tr>
    <tr>
    <td colspan="5" align="right">
           Halaman : <?= $this->current?>/<?=$this->totalPages?>
    </td>
</tr>
    <tr>
    <td colspan="5">
        <hr  width="100%" />
    </td>
    </tr>
</table>
</div>